CREATE TABLE [dbo].[THANH_VIEN]
(
[MATV] [char] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[HO_TEN] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CMND] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[NGAYSINH] [date] NOT NULL,
[QUOC_TICH] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DIA_CHI] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MAT_KHAU] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[GIOI_TINH] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DIEM_TICH_LUY] [int] NOT NULL,
[HO_CHIEU] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EMAIL] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[NGHE_NGHIEP] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LOAITV] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DIEN_THOAI_1] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DIEN_THOAI_2] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[THANH_VIEN] ADD CONSTRAINT [CK__THANH_VIE__DIEM___15502E78] CHECK (([DIEM_TICH_LUY]>=(0)))
GO
ALTER TABLE [dbo].[THANH_VIEN] ADD CONSTRAINT [CK__THANH_VIE__GIOI___145C0A3F] CHECK (([GIOI_TINH]='NU' OR [GIOI_TINH]='NAM'))
GO
ALTER TABLE [dbo].[THANH_VIEN] ADD CONSTRAINT [CK__THANH_VIE__LOAIT__164452B1] CHECK (([LOAITV]='PLATINUM' OR [LOAITV]='GOLD' OR [LOAITV]='SILVER' OR [LOAITV]='STANDARD'))
GO
ALTER TABLE [dbo].[THANH_VIEN] ADD CONSTRAINT [PK__THANH_VI__6023720905CB5CC7] PRIMARY KEY CLUSTERED  ([MATV]) ON [PRIMARY]
GO
